<template>
  <transition name="slide">
    <div class="list">
      <van-nav-bar title="课表查询" leftText="返回" rightText="1" leftArrow @click-left="onClickLeft" @click-right="onClickRight" />

        <van-tabs :active="active" >
          <van-tab  v-for="(items,index) in numSort" :title="items.title" :key="index">
            <van-cell-group class="vancell">
              
              <img :src="imgUrl"/>
            </van-cell-group>
          </van-tab>
        </van-tabs>
      <router-view></router-view>
    </div>
  </transition>
</template>
<script>
import Vue from "vue";
import Bus from "../../common/bus";
import store from "../../common/store";
import { Loading } from "vant";
import { Tab, Tabs } from "vant";
import { Cell, CellGroup } from "vant";
import { Dialog } from 'vant';

Vue.use(Cell).use(CellGroup);
Vue.use(Tab).use(Tabs);


export default {
  data() {
    return {
      active: 0,
      scheduleList: {},
      value: "",
      callNum:'',
      numSort: [
        {
          title: "周课表",
        },
        {
          title: "月课表",
          
        }
      ]
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    onClickRight() {
      this.$router.push("/list/mint-pull");
    },
    onSearch() {},
    onCancel() {},
  },
  computed: {
    imgUrl() {
      let url =
        "http://kb.xidian.cc/upload/pic/" +
        this.scheduleList[1] +
        "/" +
        this.scheduleList[2] +
        ".gif";
      return url;
    }
  },
  created() {
    this.scheduleList = store.state.scheduleList;
    console.log(store.state.scheduleList);
  }
};
</script>

<style lang="less">
@import "../../assets/less/baseDetail.less";
// .content {
//   width: 100%;
//   overflow: auto;
// }
// .list {
//   overflow: scroll;
// }
.van-tabs {
  height: calc(~"100% - 88px");
}
.van-cell {
  height: 70px;
  font-size: 16px;
  padding-left: 25px;
}
// .vancell{
//   height: calc(~'100% -132px');
//   overflow: scroll;
// }
.van-tabs__content{
  // height: 500px;
  height: calc(~'100%');
  overflow: scroll;
}
</style>

